import request from './request.js'

// 支付
function setPay(data) {
	return request({
		data: data,
		method: "POST",
		url: 'pay/quickpay'
	})
}

// 短信验证码
function sendCode(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/sendcode'
	})
}

// 微信绑定和登录
function welogin(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/wechatLogin'
	})
}

// 登录
function login(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/smslogin'
	})
}

// 绑定上级
function binduser(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/binduser'
	})
}

// 用户信息
function getUserInfo(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/getuserinfo'
	})
}

// 修改用户信息
function editUserInfo(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/setuserbase'
	})
}

// 更新证件信息
function setUserInfo(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/setuserinfo'
	})
}

// 我的福利金
function getWelfare(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/getwelfarefundlist'
	})
}

// 获取银行卡列表
function getBankcard(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/mybankcard'
	})
}

// 添加银行卡
function addBankcard(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/bankcardadd'
	})
}

// 收获地址
function getMyaddress(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/myaddress'
	})
}

// 门店商品列表
function getShopgoods(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/shopgoodslist'
	})
}

// 添加编辑收货地址
function addMyaddress(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/addressedit'
	})
}
// 删除收获地址
function delMyaddress(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/addressdel'
	})
}

// 我的钱包
function getMywallet(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/mywallet'
	})
}

// 旅游基金
function getMyfound(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/myfound'
	})
}

// 获取邀请码
function getInvitecode(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/invitecode'
	})
}

// 我的联系人
function getMycontacts(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/mycontacts'
	})
}

// 添加/修改联系人
function editMycontacts(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/contactsadd'
	})
}

// 线路分类
function tripCategory(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/category'
	})
}


// 我的推广
function getMyinvite(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/myinvite'
	})
}
// 推广统计
function getInviteNum(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/myinvitestat'
	})
}

// 点赞 取消点赞
function giveLike(data) {
	return request({
		data: data,
		method: "POST",
		url: 'forum/like'
	})
}

// 获取帖子
function getComment(data) {
	return request({
		data: data,
		method: "POST",
		url: 'forum/list'
	})
}

// 发布帖子
function addForum(data) {
	return request({
		data: data,
		method: "POST",
		url: 'forum/add'
	})
}

// 旅游线路
function getTravel(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/list'
	})
}

// 线路详情
function getTraveldet(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/detail'
	})
}

// 拼团列表
function getGrouponlist(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/grouponlist'
	})
}

// 我的行程
function getMyTravel(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/mytrip'
	})
}

// 行程排期
function getCalendar(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/schedule'
	})
}

// 添加出行人
function addTripman(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/peopleedit'
	})
}

// 获取出行人
function getTripman(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/peoplelist'
	})
}

// 编辑出行信息
function editTripgo(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/traveledit'
	})
}

// 发团
function addGroupon(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/grouponadd'
	})
}

// 获取卡券h5
function getCoupon(data) {
	return request({
		data: data,
		method: "POST",
		url: 'coupon/index'
	})
}

// 获取门店分类
function getCategorytype(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/getcategory'
	})
}

// 获取其他分类
function getAmusementtype(data) {
	return request({
		data: data,
		method: "POST",
		url: 'amusement/getcategory'
	})
}

// 门店列表
function getShoplist(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/shoplist'
	})
}

// 门店详情
function getShopdetail(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/shopdetail'
	})
}

// 获取加油品牌
function getbrand(data) {
	return request({
		data: data,
		method: "POST",
		url: 'gas/getbrand'
	})
}

// 油站列表
function getStationlist(data) {
	return request({
		data: data,
		method: "POST",
		url: 'gas/getgasinfolist'
	})
}

// 加油订单
function getoilOrder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'gas/getorderlist'
	})
}

// 加油支付
function getOilpay(data) {
	return request({
		data: data,
		method: "POST",
		url: 'gas/getpayurl'
	})
}

// 省市列表
function getregion(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/getregion'
	})
}

// 商品列表
function getGoodsList(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/list'
	})
}

// 商品详情
function getGoodsDetail(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/detail'
	})
}

// 添加收藏
function addCollect(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/favadd'
	})
}

// 我的收藏
function getMyCollect(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/myfav'
	})
}

// 我的购物车
function getMycart(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/mycart'
	})
}

// 添加购物车
function addMycart(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/cartadd'
	})
}

// 删除购物车商品
function delMycart(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/cartdel'
	})
}

// 确认订单
function orderconfirm(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/orderconfirm'
	})
}

// 添加发票
function addInvoice(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/invoiceadd'
	})
}

// 结算订单
function addGoodsorder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/orderadd'
	})
}

function addtripOrder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/orderadd'
	})
}

// 商品订单
function getMyorder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/myorder'
	})
}

// 删除订单
function delMyorder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/orderdel'
	})
}

// 支付
function payApply(data) {
	return request({
		data: data,
		method: "POST",
		url: 'pay/apply'
	})
}

// 购买vip
function upVip(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/memberorderadd'
	})
}

// 我的邀约
function getMyinvit(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/myactivity'
	})
}

// 京东分类
function getJdtype(data) {
	return request({
		data: data,
		method: "POST",
		url: 'goods/getcategory'
	})
}

// 活动申请
function getActivity(data) {
	return request({
		data: data,
		method: "POST",
		url: 'trip/activityadd'
	})
}

// 机场
function getAirport(data) {
	return request({
		data: data,
		method: "POST",
		url: 'air/airport'
	})
}

// 航班查询
function getFlight(data) {
	return request({
		data: data,
		method: "POST",
		url: 'air/flight'
	})
}

// 机票预订
function getAirOrder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'air/orderadd'
	})
}

// 机票订单
function getAirOrderList(data) {
	return request({
		data: data,
		method: "POST",
		url: 'air/orderlist'
	})
}

// 取消机票订单
function celAirOrder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'air/ordercancel'
	})
}

//  删除机票订单
function delAirOrder(data) {
	return request({
		data: data,
		method: "POST",
		url: 'air/orderdel'
	})
}

function airOrderDetail(data) {
	return request({
		data: data,
		method: "POST",
		url: 'air/orderDetail'
	})
}

// 我的佣金
function mycommission(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/mycommission'
	})
}

// 我的佣金明细列表
function commissionlist(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/commissionlist'
	})
}

//  门店入驻
function jionShop(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/join'
	})
}

// 领取vip
function getVipCard(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/expressadd'
	})
}

// banner图
function getBanner(data) {
	return request({
		data: data,
		method: "POST",
		url: 'getbanner'
	})
}

// 上传聊天Id
function getChatId(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/saveMyChatUserId'
	})
}

// 提现到银行卡
function moneyTx(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/withdrawal'
	})
}

// 微信提现
function weixinTx(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/wechatwithdrawal'
	})
}

// 我的门店(判断是否审核通过)
function getMyshop(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/myshop'
	})
}

// 门店商品
function getShopGoods(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/mygoods'
	})
}

// 门店商品上下架
function standGoods(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/shopgoodsshow'
	})
}

// 删除门店
function delGoods(data) {
	return request({
		data: data,
		method: "POST",
		url: 'shop/shopgoodsdel'
	})
}

function commissionToWallet(data) {
	return request({
		data: data,
		method: "POST",
		url: 'user/commissionToWallet'
	})
}

export default {
	commissionToWallet,
	delGoods,
	standGoods,
	getShopGoods,
	getMyshop,
	weixinTx,
	getShopgoods,
	welogin,
	moneyTx,
	getChatId,
	getBanner,
	getVipCard,
	jionShop,
	tripCategory,
	airOrderDetail,
	celAirOrder,
	delAirOrder,
	setPay,
	sendCode,
	login,
	getUserInfo,
	setUserInfo,
	getBankcard,
	addBankcard,
	editUserInfo,
	getMyaddress,
	addMyaddress,
	delMyaddress,
	getMywallet,
	getMyfound,
	getInvitecode,
	getMyinvite,
	getInviteNum,
	giveLike,
	getTravel,
	getTraveldet,
	getCalendar,
	addTripman,
	getTripman,
	editTripgo,
	getCoupon,
	getCategorytype,
	getAmusementtype,
	getShoplist,
	getShopdetail,
	getbrand,
	getStationlist,
	getoilOrder,
	getOilpay,
	getregion,
	addGroupon,
	getGoodsList,
	getGoodsDetail,
	addCollect,
	getMyCollect,
	getMyTravel,
	getMycart,
	addMycart,
	delMycart,
	getWelfare,
	orderconfirm,
	addInvoice,
	addGoodsorder,
	getGrouponlist,
	getMyorder,
	delMyorder,
	payApply,
	getComment,
	getMycontacts,
	editMycontacts,
	addForum,
	getMyinvit,
	upVip,
	getJdtype,
	getActivity,
	addtripOrder,
	getAirport,
	getFlight,
	getAirOrder,
	getAirOrderList,
	mycommission,
	commissionlist,
	binduser
};
